/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Passagem.java
 *
 * Created on 27/06/2012, 20:39:10
 */
package skyuff;

import Controle.Agencia;
import javax.swing.JOptionPane;

/**
 *
 * @author Máctassio
 */
public class Passagem extends javax.swing.JFrame {

    String numeroVoo = "";
    /** Creates new form Passagem */
    public Passagem() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        classeButtonGroup = new javax.swing.ButtonGroup();
        assentoButtonGroup = new javax.swing.ButtonGroup();
        classeLabel = new javax.swing.JLabel();
        aRadiobutton = new javax.swing.JRadioButton();
        bRadioButton = new javax.swing.JRadioButton();
        cRadioButton = new javax.swing.JRadioButton();
        assentoLabel = new javax.swing.JLabel();
        janelaRadioButton = new javax.swing.JRadioButton();
        corredorRadioButton = new javax.swing.JRadioButton();
        reservaCheckBox = new javax.swing.JCheckBox();
        passagemLabel = new javax.swing.JLabel();
        confirmaButton = new javax.swing.JButton();
        cancelaButton = new javax.swing.JButton();
        jatoCheckBox = new javax.swing.JCheckBox();
        voo = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setName("Form"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(skyuff.SkyUFFApp.class).getContext().getResourceMap(Passagem.class);
        classeLabel.setText(resourceMap.getString("classeLabel.text")); // NOI18N
        classeLabel.setName("classeLabel"); // NOI18N

        classeButtonGroup.add(aRadiobutton);
        aRadiobutton.setText(resourceMap.getString("aRadiobutton.text")); // NOI18N
        aRadiobutton.setName("aRadiobutton"); // NOI18N

        classeButtonGroup.add(bRadioButton);
        bRadioButton.setText(resourceMap.getString("bRadioButton.text")); // NOI18N
        bRadioButton.setName("bRadioButton"); // NOI18N

        classeButtonGroup.add(cRadioButton);
        cRadioButton.setText(resourceMap.getString("cRadioButton.text")); // NOI18N
        cRadioButton.setName("cRadioButton"); // NOI18N

        assentoLabel.setText(resourceMap.getString("assentoLabel.text")); // NOI18N
        assentoLabel.setName("assentoLabel"); // NOI18N

        assentoButtonGroup.add(janelaRadioButton);
        janelaRadioButton.setText(resourceMap.getString("janelaRadioButton.text")); // NOI18N
        janelaRadioButton.setName("janelaRadioButton"); // NOI18N

        assentoButtonGroup.add(corredorRadioButton);
        corredorRadioButton.setText(resourceMap.getString("corredorRadioButton.text")); // NOI18N
        corredorRadioButton.setName("corredorRadioButton"); // NOI18N

        reservaCheckBox.setText(resourceMap.getString("reservaCheckBox.text")); // NOI18N
        reservaCheckBox.setName("reservaCheckBox"); // NOI18N

        passagemLabel.setFont(resourceMap.getFont("passagemLabel.font")); // NOI18N
        passagemLabel.setText(resourceMap.getString("passagemLabel.text")); // NOI18N
        passagemLabel.setName("passagemLabel"); // NOI18N

        confirmaButton.setText(resourceMap.getString("confirmaButton.text")); // NOI18N
        confirmaButton.setName("confirmaButton"); // NOI18N
        confirmaButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                confirmaButtonMouseClicked(evt);
            }
        });

        cancelaButton.setText(resourceMap.getString("cancelaButton.text")); // NOI18N
        cancelaButton.setName("cancelaButton"); // NOI18N
        cancelaButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                cancelaButtonMouseClicked(evt);
            }
        });

        jatoCheckBox.setText(resourceMap.getString("jatoCheckBox.text")); // NOI18N
        jatoCheckBox.setName("jatoCheckBox"); // NOI18N

        voo.setText(resourceMap.getString("voo.text")); // NOI18N
        voo.setName("voo"); // NOI18N
        voo.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                vooMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jatoCheckBox)
                        .addContainerGap())
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(reservaCheckBox)
                            .addContainerGap())
                        .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(assentoLabel)
                                    .addGap(18, 18, 18)
                                    .addComponent(janelaRadioButton)
                                    .addGap(18, 18, 18)
                                    .addComponent(corredorRadioButton))
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(classeLabel)
                                    .addGap(18, 18, 18)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(voo)
                                        .addGroup(layout.createSequentialGroup()
                                            .addComponent(aRadiobutton)
                                            .addGap(18, 18, 18)
                                            .addComponent(bRadioButton)
                                            .addGap(18, 18, 18)
                                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(passagemLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                .addComponent(cRadioButton))))))
                            .addContainerGap(180, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(confirmaButton)
                            .addGap(18, 18, 18)
                            .addComponent(cancelaButton)))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(passagemLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(voo)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(classeLabel)
                    .addComponent(aRadiobutton)
                    .addComponent(bRadioButton)
                    .addComponent(cRadioButton))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(assentoLabel)
                    .addComponent(janelaRadioButton)
                    .addComponent(corredorRadioButton))
                .addGap(8, 8, 8)
                .addComponent(jatoCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(reservaCheckBox)
                .addGap(43, 43, 43)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(confirmaButton)
                    .addComponent(cancelaButton))
                .addContainerGap(26, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void cancelaButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cancelaButtonMouseClicked
   this.dispose();
}//GEN-LAST:event_cancelaButtonMouseClicked

private void vooMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_vooMouseClicked

    VisualizarVoo voo = new VisualizarVoo();
    voo.setVisible(true);
   
    numeroVoo = JOptionPane.showInputDialog(null, "Digite o codigo do Voo");
    
    
    
}//GEN-LAST:event_vooMouseClicked

private void confirmaButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_confirmaButtonMouseClicked
        Agencia agencia = new Agencia();
        
        
                
}//GEN-LAST:event_confirmaButtonMouseClicked

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Passagem.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Passagem.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Passagem.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Passagem.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new Passagem().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JRadioButton aRadiobutton;
    private javax.swing.ButtonGroup assentoButtonGroup;
    private javax.swing.JLabel assentoLabel;
    private javax.swing.JRadioButton bRadioButton;
    private javax.swing.JRadioButton cRadioButton;
    private javax.swing.JButton cancelaButton;
    private javax.swing.ButtonGroup classeButtonGroup;
    private javax.swing.JLabel classeLabel;
    private javax.swing.JButton confirmaButton;
    private javax.swing.JRadioButton corredorRadioButton;
    private javax.swing.JRadioButton janelaRadioButton;
    private javax.swing.JCheckBox jatoCheckBox;
    private javax.swing.JLabel passagemLabel;
    private javax.swing.JCheckBox reservaCheckBox;
    private javax.swing.JButton voo;
    // End of variables declaration//GEN-END:variables
}
